package com.blog.controller.frontpage;

import java.io.IOException;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.blog.controller.base.BaseServlet;
import com.blog.entity.TypesEntity;
import com.blog.service.frontpage.IndexService;

@WebServlet("/header")
public class IndexTypesServlet extends BaseServlet {

	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		
	}

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		IndexService service = new IndexService();
		List<TypesEntity> typesList = service.getAllTypesInfo();
		req.setAttribute("typesList",typesList);
		
		forward("llpfrontpage/header");
	}
}
